Draft Draft2Sketch/ro

Draft Draft2Sketch

Menu location
Drafting → Draft to Sketch
Workbenches
Draft, Arch
Default shortcut
None
Introduced in version
-
See also
None

Description

Descriere

Acest instrument convertește Draft objects la Sketcher objects și invers.

Usage

Cum se utilizează

  1. Selectați un obiect Draft sau Sketch
  2. Apăsați butonul Draft Draft2Sketch

Notes

Scripting

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

To convert objects to a sketch use the make_sketch method (introduced in version 0.19) of the Draft module. This method replaces the deprecated makeSketch method.

sketch = make_sketch(objects_list, autoconstraints=False, addTo=None, delete=False, name="Sketch", radiusPrecision=-1, tol=1e-3)

To convert a sketch to Draft objects use the draftify method of the Draft module.

draftify(objectslist, makeblock=False, delete=True)

Example:

import FreeCAD as App
import Draft

doc = App.newDocument()

rectangle = Draft.make_rectangle(2000, 1000)
circle = Draft.make_circle(500)
doc.recompute()

sketch_from_draft = Draft.make_sketch([rectangle, circle], autoconstraints=True, delete=False, radiusPrecision=0)
doc.recompute()

draft_from_sketch = Draft.draftify(sketch_from_draft, delete=False)
doc.recompute()